home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0159 / vc.zip / VCVIEW.CPP < prev    next >
C/C++ Source or Header  |  1996-01-08  |  2KB  |  88 lines

  1. // vcview.cpp : implementation of the CVcView class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "vc.h"
  6.  
  7. #include "vcdoc.h"
  8. #include "vcview.h"
  9.  
  10. #ifdef _DEBUG
  11. #undef THIS_FILE
  12. static char BASED_CODE THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CVcView
  17.  
  18. IMPLEMENT_DYNCREATE(CVcView, CFormView)
  19.  
  20. BEGIN_MESSAGE_MAP(CVcView, CFormView)
  21.     //{{AFX_MSG_MAP(CVcView)
  22.     ON_VBXEVENT(VBN_CHANGE, IDC_SELECTOR1, OnChangeSelector1)
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CVcView construction/destruction
  28.  
  29. CVcView::CVcView()
  30.     : CFormView(CVcView::IDD)
  31. {
  32.     //{{AFX_DATA_INIT(CVcView)
  33.     m_select2 = NULL;
  34.     m_select1 = NULL;
  35.     //}}AFX_DATA_INIT
  36.     // TODO: add construction code here
  37. }
  38.  
  39. CVcView::~CVcView()
  40. {
  41. }
  42.  
  43. void CVcView::DoDataExchange(CDataExchange* pDX)
  44. {
  45.     CFormView::DoDataExchange(pDX);
  46.     //{{AFX_DATA_MAP(CVcView)
  47.     DDX_VBControl(pDX, IDC_SELECTOR2, m_select2);
  48.     DDX_VBControl(pDX, IDC_SELECTOR1, m_select1);
  49.     //}}AFX_DATA_MAP
  50. }
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CVcView diagnostics
  54.  
  55. #ifdef _DEBUG
  56. void CVcView::AssertValid() const
  57. {
  58.     CFormView::AssertValid();
  59. }
  60.  
  61. void CVcView::Dump(CDumpContext& dc) const
  62. {
  63.     CFormView::Dump(dc);
  64. }
  65.  
  66. CVcDoc* CVcView::GetDocument() // non-debug version is inline
  67. {
  68.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVcDoc)));
  69.     return (CVcDoc*)m_pDocument;
  70. }
  71. #endif //_DEBUG
  72.  
  73. /////////////////////////////////////////////////////////////////////////////
  74. // CVcView message handlers
  75.  
  76.  
  77. void CVcView::OnChangeSelector1(UINT, int, CWnd*, LPVOID)
  78. {
  79. long value;
  80.  
  81.     value=long(m_select1->GetNumProperty("Value"));
  82.     m_select1->SetNumProperty("SelectionID",value);  
  83.       
  84.     value=long(m_select1->GetNumProperty("SelectionFontID"));
  85.     m_select1->SetNumProperty("CaptionFontID",value);
  86.  
  87. }
  88.